using DatabaseService.DatabaseDAO;
using DatabaseService.Model;
using System;
using System.Collections;
using System.Collections.Generic;
using You.DatabaseModel;

//<copyright project="You.project" company="you">
// Copyright (c）YOU. All rights reserved.
//</copyright>
//<author>you</author>
//<date>2025-05-07</date>
// 数据库仓储
//*********************************************************************************
//<remarks>note..</remarks>
namespace You.Respository
{
    /// <summary>
    /// test表仓储
    /// <summary>
    public class TestRespository : BaseRespository<TestMapper>
    {
        /// <summary>
        /// 获取一页数据
        /// </summary>
        /// <param name="filterMapper"></param>
        /// <param name="pageTable"></param>
        /// <returns></returns>
        public IList<TestMapper> GetOnePageData(TestMapper filterMapper, PageTable pageTable)
        {
            var parameters = new MapperDictionary();
            if (pageTable.IsPage)
            {
                parameters.Add("pagesize", pageTable.PageSize);
                parameters.Add("page", pageTable.PageIndex);
            }
            DaoParametersEntity entity = new DaoParametersEntity("GetOnePageData", parameters);
            return databaseServiceDAO.Select<TestMapper>(entity);
        }
    }
}
